<!DOCTYPE html>
<html>
<head>
    <title>模具备件库存状况</title>
    #parse("sys/header.html")
</head>
<style>
    ::-webkit-scrollbar{
        width: 10px;
        height: 10px;
    }
    ::-webkit-scrollbar-thumb{
        border-radius: 10px;
        -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
        background: #a8a5a5;
    }
</style>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-select v-model="q.storeId" placeholder="请选择仓库">
                        <i-option v-for="item in storeHouseList" :value="item.id" :key="item.id">{{item.name}}</i-option>
                    </i-select>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.sparePartsName" @on-enter="query" placeholder="请输入型芯名称"/>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.uniqueBarCode" @on-enter="query" placeholder="请输入条码代码"/>
                </i-col>
                <i-col span="4">
                    <Date-picker v-model="q.batchMonth" type="month" format="yyyyMM" placeholder="请选择批次月份" class="from_tab_wide" style="width: 100%;"></Date-picker>
                </i-col>
                <i-col span="4">
                    <i-select v-model="q.state" placeholder="库存状态">
                        <i-option v-for="item in moduleSparePartsStockStateList" :value="item.value" :key="item.value">{{item.name}}</i-option>
                    </i-select>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                #if($shiro.hasPermission("modulespstock:scanStockIn"))
                <i-button type="info" @click="batchStockIn"><i class="fa fa-plus"></i>&nbsp;扫码入库</i-button>
                #end
                #if($shiro.hasPermission("modulespstock:scanStockOut"))
                <i-button type="info" @click="batchStockOut"><i class="fa fa-pencil-square-o"></i>&nbsp;扫码出库</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="moduleSpStock" :rules="ruleValidate" :label-width="80">
            <Row>
                <i-col span="11">
                    <Form-item label="备注" prop="remark">
                        <i-input v-model="moduleSpStock.remark" placeholder="备注"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="最近一次更新用户" prop="modifyUser">
                        <i-input v-model="moduleSpStock.modifyUser" placeholder="最近一次更新用户"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="最近一次更新时间" prop="gmtModified">
                        <i-input v-model="moduleSpStock.gmtModified" placeholder="最近一次更新时间"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="创建用户" prop="createUser">
                        <i-input v-model="moduleSpStock.createUser" placeholder="创建用户"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="创建时间" prop="gmtCreate">
                        <i-input v-model="moduleSpStock.gmtCreate" placeholder="创建时间"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="删除标识" prop="delFlag">
                        <i-input v-model="moduleSpStock.delFlag" placeholder="删除标识"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="出库时间" prop="stockOutDate">
                        <i-input v-model="moduleSpStock.stockOutDate" placeholder="出库时间"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="入库时间" prop="stockInDate">
                        <i-input v-model="moduleSpStock.stockInDate" placeholder="入库时间"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="库存状态" prop="state">
                        <i-input v-model="moduleSpStock.state" placeholder="库存状态"/>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="型芯备件唯一码" prop="uniqueCode">
                        <i-input v-model="moduleSpStock.uniqueCode" placeholder="型芯备件唯一码"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="采购批次ID" prop="purchasingBatchId">
                        <i-input v-model="moduleSpStock.purchasingBatchId" placeholder="采购批次ID"/>
                    </Form-item>
                </i-col>
            </Row>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/module/modulespstock.js?_${date.systemTime}"></script>
</body>
</html>
